package com.woniu.cq.medical.dao;

import com.woniu.cq.medical.entity.AdministrativeWorkloadAccount;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Lucas
 * @since 2020-09-09
 */
public interface AdministrativeWorkloadAccountMapper extends BaseMapper<AdministrativeWorkloadAccount> {


    List<AdministrativeWorkloadAccount> selectDoctorIdAccount(Integer doctorId, LocalDate administrativeWorkloadAccountDate);

    @Update("update lonbon_administrative_workload_account set wait_check_count=#{waitCheckCountNew} where administrative_workload_account_id=#{administrativeWorkloadAccountId}")
    int updateWaitCheckCount(Integer administrativeWorkloadAccountId, int waitCheckCountNew);
    void updatePatientCount(@Param("administrativeId") int administrativeId, @Param("date") Date date);

    void updateWaitPatientCount(@Param("administrativeId") int administrativeId, @Param("date") Date date);

    List<AdministrativeWorkloadAccount> getRealTimeData(Date date);

    List<AdministrativeWorkloadAccount> pageQuery(@Param("pageStart") int pageStart, @Param("pageSize")int pageSize, @Param("administrativeName")String administrativeName, @Param("attendanceDateBefore")Date attendanceDateBefore, @Param("attendanceDateAfter")Date attendanceDateAfter);

    long totalCount(@Param("administrativeName")String administrativeName, @Param("attendanceDateBefore")Date attendanceDateBefore, @Param("attendanceDateAfter")Date attendanceDateAfter);
}
